#include<iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <stack>
#include <set>
#include <map>
using namespace std;
class Solution {
public:
    bool isValidSudoku(vector<vector<char>>& board) {
        bool pd[3][9][10];
        memset(pd, 0, sizeof pd);
        for (int i = 0; i < 9; i++)
        {
            for (int j = 0; j < 9; j++)
            {
                int t = board[i][j] - '0';
                if (t == '.' - '0')continue;
                if (pd[0][i][t])return 0;
                pd[0][i][t] = 1;
                if (pd[1][j][t])return 0;
                pd[1][j][t] = 1;

                int tt = i / 3 * 3 + j/3;
                if (pd[2][tt][t])return 0;
                pd[2][tt][t] = 1;


            }
        }
        return 1;
    }
};
int main()
{
    Solution sol;
}